package technotheist.data.jbuffer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */



import java.nio.ShortBuffer;
import technotheist.data.BBuffer;

/**
 *
 * @author Mitch
 */
public final class JShortBuffer extends BBuffer<Short> {
    private final int size;
    private final ShortBuffer buffer;

    public JShortBuffer(int size, ShortBuffer buffer) {
	this.size = size;
	this.buffer = buffer;
    }

    

    @Override
    public int size() {
	return size;
    }

    @Override
    public Short s(int index) {
	return buffer.get(index);
    }

    @Override
    public void s(int index, Short v) {
	buffer.put(index, v);
    }

    protected ShortBuffer buffer() {
	return buffer;
    }

    @Override
    public Class<Integer> primType() {
	return Integer.TYPE;
    }
    
}
